package org.dbstar.scheduler.beans;

/**
 * 执行命令行的Job
 * 
 * @author 代波
 * @since 1.0.0
 * @version 1.0.0
 * @date 2012-4-28
 */
public class CmdJob extends Job {
	private static final long serialVersionUID = -264572618651430624L;

	private String finalCmd;
	private FileCmdJobResult result = new FileCmdJobResult();

	@Override
	public final String getType() {
		return CmdJobConf.JOB_TYPE;
	}

	public final String getFinalCmd() {
		return finalCmd;
	}

	public final void setFinalCmd(String finalCmd) {
		this.finalCmd = finalCmd;
	}

	@Override
	public final String getContent() {
		return getFinalCmd();
	}

	@Override
	public final void setContent(String content) {
		setFinalCmd(content);
	}

	@Override
	public final FileCmdJobResult getResult() {
		return result;
	}

	@Override
	public CmdJob clone() throws CloneNotSupportedException {
		CmdJob job = (CmdJob) super.clone();
		job.result = (FileCmdJobResult) this.result.clone();
		return job;
	}
}
